////////////////////////////////////////////////////////////////////////////
/// @file    TimeUsedUT.cpp
/// @brief   unit test for class TimeUsed
/// @author  lihuanghai@snda.com
/// @date    2011-06-08
/// @version 1.0
////////////////////////////////////////////////////////////////////////////

#include "gtest/gtest.h"

#include <string.h>
#include <boost/format.hpp>
#include "reclog.h"

using boost::format;

class RecLogTest : public testing::Test
{
protected:
    /// @brief SetUp Be invoked before each case.
    virtual void SetUp()
    {
    }

    /// @brief TearDown Be invoked before each case.
    virtual void TearDown()
    {
    }

    /// @brief SetUpTestCase Be invoked before each fixture.
    static void SetUpTestCase()
    {
    	RecLogFactory::getGlobalLog()->init("./reclog4c.conf",NULL);
    }

    /// @brief TearDownTestCase Be invoked Before each fixture.
    static void TearDownTestCase()
    {
    }

};

TEST_F(RecLogTest, TestLog)
{
	RECFATAL("fatal");
	RECFATAL(format("fatal %d") % 11);
}

